<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" lang="zh">
<head th:replace="common/header::header">
</head>
<body>
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 考勤管理 <span class="c-gray en">&gt;</span> 考勤信息 <a id="btn-refresh" class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" onclick="refresh()" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container" id="form_data">
    <section class="text-c"> 考勤状态：
        <span class="select-box inline">
            <select id="attendStatus" name="attendStatus" class="select" style="width: 170px">
                <option value="1">正常</option>
                <option value="0">异常</option>
            </select>
        </span>
        <span>&emsp;&emsp;用户名:</span>
        <input type="text" class="input-text" style="width:250px" placeholder="输入用户名称" id="userName" name="userName"/>&emsp;&emsp;
        <button type="submit" class="btn btn-success" id="search" ><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
    </section>
    <div id="search_data">
        <div class="cl pd-5 bg-1 bk-gray mt-20">
			<span class="l">
				<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
				<a href="javascript:;" onclick="download_excel()" class="btn btn-secondary radius"><i class="Hui-iconfont">&#xe640;</i> 导出EXCEL</a>
				<a href="javascript:;" onclick="upload_excel()" class="btn btn-upload radius"><i class="Hui-iconfont">&#xe645;</i>读取EXCEL</a>
			</span>
            <span class="r">共有数据：<strong th:text="${lists.total}">54</strong> 条</span>
        </div>
        <div class="mt-20" id="page_data">
            <table id="userList" class="table table-border table-bordered table-bg table-hover table-sort">
                <thead>
                <tr class="text-c">
                    <th width="25"><input type="checkbox" name="subCheck" id="subCheck"/></th>
                    <th width="40">序号</th>
                    <th width="">考勤用户</th>
                    <th width="">打卡日期</th>
                    <th width="">打卡星期</th>
                    <th width="">上午打卡时间</th>
                    <th width="">下午打卡时间</th>
                    <th width="">上班时长</th>
                    <th width="">缺勤时长</th>
                    <th width="">考勤状态</th>
                    <th width="">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c" th:each="item:${lists}">
                    <td><input type="checkbox" th:attr="value=${item.userId}" name="subCheck" /></td>
                    <td th:text="${itemStat.count}"></td>
                    <td th:text="${item.userName}"></td>
                    <td th:text="${item.attendDate}"></td>
                    <td th:text="${item.attendWeek}"></td>
                    <td id="attendMorning" th:text="${#dates.format(item.attendMorning,'HH:mm:ss')}"></td>
                    <td id="attendEvening" th:text="${#dates.format(item.attendEvening,'HH:mm:ss')}"></td>
                    <td id="workHours" th:text="${item.workHours}+'h'"></td>
                    <td th:text="${item.absence}==0?'暂未缺勤':${item.absence}+'min'"></td>
                    <th:block th:if="${item.attendStatus}==1">
                        <td class="td-status"><span class="label label-success radius">正常</span></td>
                    </th:block>
                    <th:block th:if="${item.attendStatus}==0">
                        <td class="td-status"><span class="label radius">异常</span></td>
                    </th:block>
                    <td class="td-manage">
                        <a title="删除" href="javascript:;" th:onclick="'javascript:admin_del(\''+${item.userId}+'\')'" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                    </td>
                </tr>
                </tbody>
            </table>
            <script th:include="common/pages::pages" th:inline="javascript"></script>
        </div>
    </div>
</div>

<footer th:replace="common/footer::footer"></footer>
<script th:src="@{/js/system/attend/attendList.js}" th:inline="javascript"></script>
</body>
</html>